﻿// STATS MODULE
//      Luca Puccini
//      Marco Cornolti
//      Michele Sottile
//      Matteo Parchi
   
// RELEASED FEEDBACK OBJECT

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Stats.Objects
{
    /// <summary>
    /// Represents the request object passed from groupware to stat module when a feedback is left for driver and update is needed
    /// </summary>
     public class ReleasedFeedback
    {
        /// <summary>
        /// the feedback sender ID
        /// </summary>
        public int SenderID { get; set; }

        /// <summary>
        /// the feedback receiver ID
        /// </summary>
        public int ReceiverID { get; set; }

        /// <summary>
        /// generic vote left
        /// </summary>
        public int GeneralVote { get; set; }

        /// <summary>
        /// punctuality vote left
        /// </summary>
        public int Punctuality { get; set; }

        /// <summary>
        /// reliability vote left
        /// </summary>
        public int Reliability { get; set; }

        /// <summary>
        /// courtesy vote left (ignored if feedback is released from driver to passenger)
        /// </summary>
        public int Courtesy { get; set; }

        /// <summary>
        /// boolean that indicates if the receiver user was present
        /// </summary>
        public bool WasPresent { get; set; }

        /// <summary>
        /// feedback comment left
        /// </summary>
        public string Comment { get; set; }

        /// <summary>
        /// The released feedback type:
        /// TYPE = 0 --> FEEDBACK FROM DRV TO PSN  
        /// .... TYPE = 1 --> FEEDBACK FROM PSN TO DRV  
        /// </summary>
        public int ReleasedFeedbackType { get; set; }

        /// <summary>
        /// the tripID which the feedback released is about
        /// </summary>
        public int TripID { get; set; }

        /// <summary>
        /// Constructor for the feedback left for a driver from a passenger
        /// </summary>
        /// <param name="sender_id">Sender ID</param>
        /// <param name="receiver_id">Receiver ID (DriverID)</param>
        /// <param name="general_vote">General Vote left</param>
        /// <param name="punctuality">Punctuality Vote left</param>
        /// <param name="reliability">Reliability Vote left</param>
        /// <param name="courtesy">Courtesy Vote left</param>
        /// <param name="comment">Comment left</param>
        /// <param name="trip_id">The ID of the trip which the released feedback is about</param>
        /// <param name="type">The released feedback type...FROM DRV TO PSN --> TYPE = 0 ...FROM PSN TO DRV...TYPE = 1</param>
        /// <param name="was_present">Boolean that indicates if the receiver was present in the trip</param>
        public ReleasedFeedback (int sender_id, int receiver_id, int general_vote, int punctuality, int reliability, int courtesy, string comment, int trip_id, int type, bool was_present)//, int feedbackRequest_ID)
        {
            SenderID = sender_id;
            ReceiverID = receiver_id;
            GeneralVote = general_vote;
            Punctuality = punctuality;
            Reliability = reliability;
            Courtesy = courtesy;
            Comment = comment;
            TripID = trip_id;
            ReleasedFeedbackType = type;
            WasPresent = was_present;
        }
                
    }
}
